package com.gt.login;

import java.util.List;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

public class ListFilesOnlyArrAdapter extends ArrayAdapter<String> {
	private List<String> users;
	private Context context;
	//private int listlayout;

	public ListFilesOnlyArrAdapter(Context context, int textViewResourceId,
			List<String> users) {
		super(context, textViewResourceId, users);
		this.users = users;
		//listlayout = textViewResourceId;
		this.context = context;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup viewGroup) {
		String userName = users.get(position);
		if (null == convertView) {
			LayoutInflater inflater = (LayoutInflater) context
					.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
			convertView = inflater.inflate(R.layout.list_layout, null);
		}
		TextView firstName = (TextView) convertView
				.findViewById(R.id.firstNameTv);
		firstName.setText(userName);
		return convertView;
	}
}